package com.wby.deu.service.impl;

import com.wby.deu.pojo.Article;
import com.wby.deu.repository.ArticleRepository;
import com.wby.deu.service.ArticleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArticleServiceImpl implements ArticleService {

    private ArticleRepository articleRepository;

    @Autowired
    public void setArticleRepository(ArticleRepository articleRepository) {
        this.articleRepository = articleRepository;
    }


    @Override
    public Page<Article>findAll(Pageable pageable) {
        Page<Article> all = articleRepository.findAll(pageable);
        return all;
    }
}
